<template>
<div class="swiper mySwiper" :pagination="{ clickable: true }">
    <div class="swiper-wrapper">
        <slot></slot>
    </div>
    <div class="swiper-pagination"></div>

    <!-- 如果需要分页器 -->
</div>
</template>

<script>

import 'swiper/css'
import Swiper from 'swiper'

import 'swiper/css/pagination'
export default {
  props: {
    loop: {
      type: Boolean,
      default: true
    }
  },
  mounted () {
    new Swiper('.mySwiper', {
      pagination: {
        el: '.swiper-pagination'
      },
      loop: true
    })
  }
}
</script>
